/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package server;

import client.ClientOd;
import commun.Message;
import frame.Fserver;
import java.rmi.Remote;
import java.rmi.RemoteException;
import user.Login;

import user.User;

/**
 *
 * @author Qiao BingZhi
 */
public interface _ZoneExchange extends Remote{
    
   
   public String testMethode(String test)
            throws RemoteException;
      // register a new user which is without idUser, the server return a objet
   // user with its idUser
   public String registerUser(User user,String pwd) throws RemoteException;

   //return all of users, used for add friend
   public User[] getAllUsers() throws RemoteException;

   // get the list of friends
   public User[] getAllFriends(String id) throws RemoteException;

   // add friends
   // id1 add id2   friend
   public boolean addFriend(String id1,String id2) throws RemoteException;

   // send the message;

   public boolean sendMessage(Message message)throws RemoteException;

   public int login(Login login, ClientOd client)
			throws RemoteException;
   // logout the server

   public boolean logout(String id) throws RemoteException;

   // get the information of a user by his id

   public User getUserById(String id) throws RemoteException;

   public void getOfflineMsg(String id)throws RemoteException;

   public void setFrame(Fserver f)throws RemoteException ;
      
}
